<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>第4章企业所得税</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 20px;
      background-color: #f2f2f2;
    }
    .container {
      max-width: 900px;
      margin: auto;
      background-color: #fff;
      padding: 30px 50px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
    h1, h2 {
      text-align: center;
      color: #333;
    }
    .section {
      margin-top: 40px;
    }
    .question {
      margin-bottom: 30px;
      padding-bottom: 15px;
      border-bottom: 1px solid #ddd;
    }
    .question-title {
      font-weight: bold;
      margin-bottom: 10px;
      font-size: 1.1em;
    }
    .options {
      margin-left: 20px;
    }
    .options label {
      display: block;
      margin-bottom: 8px;
      cursor: pointer;
    }
    .options input {
      margin-right: 10px;
    }
    .submit-btn {
      display: block;
      width: 180px;
      margin: 40px auto 0;
      padding: 12px;
      background-color: #4CAF50;
      color: white;
      border: none;
      cursor: pointer;
      font-size: 1em;
      border-radius: 5px;
      transition: background-color 0.3s;
    }
    .submit-btn:hover {
      background-color: #45a049;
    }
    .result {
      margin-top: 40px;
      padding: 20px;
      background-color: #e7f3fe;
      border-left: 6px solid #2196F3;
    }
    .loading, .error {
      text-align: center;
      font-size: 1.2em;
      color: #666;
    }
  </style>
</head>
<body>

<div class="container">
  <h1 id="quiz-title">加载中...</h1>
  <div id="quiz-content"></div>
  <button class="submit-btn" onclick="submitQuiz()" style="display: none;">提交答案</button>
  <div id="quiz-result" class="result" style="display: none;"></div>
</div>

<script>
  // JSON 数据
  const data = {
    "errcode": 0,
          "errmsg": "",
          "data": {
    "problems": [
      {
        "id": 518445,
        "Body": "",
        "order": 1,
        "title": "第一大题",
        "problems": [
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列各项中，不属于企业所得税纳税人的企业是（&nbsp; &nbsp; ）。</p><p><br/></p></div>",
            "Type": "SingleChoice",
            "data": {},
            "Score": 2,
            "index": 0,
            "score": 2,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在外国成立但实际管理机构在中国境内的企业</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在中国境内成立的外商独资企业</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在中国境内成立的个人独资企业</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在中国境内未设立机构、场所，但有来源于中国境内所得的企业</p><p><br/></p></div>"
              }
            ],
            "Version": "b7474c94fb3c4ed5a5d4a56f97384a58",
            "TypeText": "单选题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807525,
            "max_retry": 1,
            "TemplateID": 10707943,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807525,
            "ProblemType": 1,
            "template_id": 10707943,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列各项中，属于企业所得税征税范围的有（&nbsp; &nbsp; ）</p><p><br/></p></div>",
            "Type": "MultipleChoice",
            "data": {},
            "Score": 5,
            "index": 0,
            "score": 5,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>居民企业来源于中国境外的所得</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>非居民企业来源于中国境内的所得</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>非居民企业来源于中国境外，与机构场所无关联的所得</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>居民企业来源于中国境内的所得</p><p><br/></p></div>"
              }
            ],
            "Version": "426d22f0a734431b8525ed28d512efcb",
            "TypeText": "多选题",
            "HalfScore": 0,
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807526,
            "max_retry": 1,
            "TemplateID": 10707946,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807526,
            "ProblemType": 2,
            "template_id": 10707946,
            "awardingRule": 1,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>注册地与实际管理机构所在地在法国的某银行取得下列各项所得中，应按规定缴纳我国企业所得税的有（&nbsp; &nbsp; &nbsp; &nbsp; ）</p><p><br/></p></div>",
            "Type": "MultipleChoice",
            "data": {},
            "Score": 5,
            "index": 0,
            "score": 5,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>转让位于我国一处不动产取得的财产转让所得</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在香港证券交易所购入我国某公司股票取得分红</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在我国设立的分行为我国某公司提供理财咨询服务取得收入</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>在我国建立的分行为位于日本的某电站提供流动资金贷款取得的利息收入</p><p><br/></p></div>"
              }
            ],
            "Version": "0e7c77e113774cddafce55293a30d57c",
            "TypeText": "多选题",
            "HalfScore": 0,
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807527,
            "max_retry": 1,
            "TemplateID": 10707948,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807527,
            "ProblemType": 2,
            "template_id": 10707948,
            "awardingRule": 1,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>甲公司2019年6月上旬接受某企业捐赠商品一批，取得捐赠企业开具的增值税专用发票，注明商品价款20万元、增值税税额2.6万元。当月下旬公司将该批商品销售，向购买方开具了增值税税专用发票，注明商品价款25万元、增值税税额4万元。不考虑城市维护建设税和教育费附加，甲公司该项业务应缴纳企业所得税 <span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span> 万元。最后的计算结果保留一位小数</p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "d47e7f56a6404a4bafb5807d5f91c8d1",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807528,
            "max_retry": 1,
            "TemplateID": 10707951,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807528,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707951,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>企业在境内发生处置资产的下列情形中，应视同销售确认企业所得税应税收入的是（　）。</p><p><br/></p></div>",
            "Type": "SingleChoice",
            "data": {},
            "Score": 2,
            "index": 0,
            "score": 2,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>将资产用于职工奖励或福利</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>将资产用于加工另一种产品</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>将资产用于总分支机构之间的转移</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>将资产结构或性能改变</p><p><br/></p></div>"
              }
            ],
            "Version": "34186a1044a041aabae678c0fee1d76e",
            "TypeText": "单选题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807529,
            "max_retry": 1,
            "TemplateID": 10707955,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807529,
            "ProblemType": 1,
            "template_id": 10707955,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列项目收入中，属于免税收入的有（　）。</p><p><br/></p></div>",
            "Type": "SingleChoice",
            "data": {},
            "Score": 2,
            "index": 0,
            "score": 2,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业债券利息收入</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>居民企业之间股息收益</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业获得的财政性资金</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>接受捐赠的实物资产价值</p><p><br/></p></div>"
              }
            ],
            "Version": "19b2e1c53c0a4e75abcc58dcdfee28e0",
            "TypeText": "单选题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807530,
            "max_retry": 1,
            "TemplateID": 10707969,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807530,
            "ProblemType": 1,
            "template_id": 10707969,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>根据企业所得税法律制度的规定，下列税金在计算企业应纳税所得额时，不得从收入总额中扣除的是（&nbsp; &nbsp; 　）。</p><p><br/></p></div>",
            "Type": "SingleChoice",
            "data": {},
            "Score": 2,
            "index": 0,
            "score": 2,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>土地增值税</p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>增值税</p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>消费税</p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>关税</p></div>"
              }
            ],
            "Version": "70f939e723194c9bbb785a496b86ccde",
            "TypeText": "单选题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807531,
            "max_retry": 1,
            "TemplateID": 10707970,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807531,
            "ProblemType": 1,
            "template_id": 10707970,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>某公司2019年会计利润为25.36万元，经某注册税务师审核，“财务费用”账户中列支有两笔利息费用：向银行借入生产用资金200万元，期限6个月，支付利息50000元；向市内某公司借款60万元，期限10个月，支付利息35000元，则该公司的应纳税所得额是 <span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span> 万元。计算结果保留两位小数。</p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "9509ae0f208d48db84679c2d3da135fe",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807532,
            "max_retry": 1,
            "TemplateID": 10707971,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807532,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707971,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列有关借款利息说法错误的是（&nbsp; &nbsp; &nbsp; ）</p><p><br/></p></div>",
            "Type": "MultipleChoice",
            "data": {},
            "Score": 5,
            "index": 0,
            "score": 5,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>购建固定资产达到预计可使用状态前的借款利息不得扣除</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>从关联方取得的借款利息支出，不得扣除</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>向非金融机构的借款利息支出，不得扣除</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>金融企业的各项存款利息支出和同业拆借利息支出，不得扣除</p><p><br/></p></div>"
              }
            ],
            "Version": "f246fa5644184bbba3174455a8745c00",
            "TypeText": "多选题",
            "HalfScore": 0,
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807533,
            "max_retry": 1,
            "TemplateID": 10707976,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807533,
            "ProblemType": 2,
            "template_id": 10707976,
            "awardingRule": 1,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>业务招待费问题：某公司2018年主营业务收入5000万元，其他业务收入2000万元，营业外收入1000万元，固定资产转让收入50万元，本年度业务招待费列支80万元，则可扣除部分是 <span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span> 万元？计算结果不保留小数。</p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "8beb63d0bb5e45459e1a10e7153cb3bc",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807534,
            "max_retry": 1,
            "TemplateID": 10707979,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807534,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707979,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>关于广告费用：某制造厂2018年销售收入3000万元，转让技术使用权收入200万元，广告费支出600万元，业务宣传费40万元，则计算应纳税所得额时调整所得是 <span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span> 万元，计算结果不保留小数。</p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "06370394a8264c23a09dd0529027816f",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807535,
            "max_retry": 1,
            "TemplateID": 10707981,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807535,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707981,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>某企业2018年会计利润为50万，当年通过政府机关向贫困地区捐款10万元，向红十字事业捐赠5万元，向受赠人直接捐赠3万元；另确认纳税调整增加额10万元，纳税调整减少额5万元，则2018年该企业应纳所得税是 <span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span> 万元，计算结果保留两位小数。</p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "d96061692b6a407694010fbaf6510ab7",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807536,
            "max_retry": 1,
            "TemplateID": 10707982,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807536,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707982,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>某企业2019年9月因管理不善发生意外事故，损失2019年5月外购的库存材料32.79万元，其中含运费2.79，取得保险公司赔款8万。要求：计算所得税税前扣除的损失数额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空1]</span>万元。计算结果保留一位小数。</p><p><br/></p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 8,
                "score": 8,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "813ee5a2f8ab4d3e944b2d0a10d027b4",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807537,
            "max_retry": 1,
            "TemplateID": 10707986,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807537,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707986,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列支出在计算企业所得税纳税所得额时，准予按规定扣除的是（　&nbsp; &nbsp;）。</p><p><br/></p></div>",
            "Type": "SingleChoice",
            "data": {},
            "Score": 2,
            "index": 0,
            "score": 2,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业内营业机构之间发生的租金支出</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业之间发生的管理费支出</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业发生的与生产有关的手续费支出</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业营业机构之间发生的特许权使用费支出</p><p><br/></p></div>"
              }
            ],
            "Version": "2df84aba390a40d09a99a5f33272b5ce",
            "TypeText": "单选题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807538,
            "max_retry": 1,
            "TemplateID": 10707991,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807538,
            "ProblemType": 1,
            "template_id": 10707991,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>假定某企业为居民企业，生产销售冰箱，2023年经营业务如下：</p><p>①冰箱销售收入2500万，冰箱配比销售成本1100万。转让技术所有权收入700万，直接与其相关的成本费用100万，</p><p>②发生销售费用670万，其中广告费450万；管理费用480万，其中业务招待费15万；财务费用60万元。销售税金40万元</p><p>③营业外支出150万元（含通过公益性社会团体向贫困山区捐款100万元，支付税收滞纳金6万）。</p><p>④已经计入成本、费用中的实发工资总额150万元、拨缴职工工会经费3万元、支出职工福利费23万元、职工教育经费5万元。</p><p>要求计算以下各项：计算结果保留1位小数。</p><p>该企业2023年度会计利润总额=<span class=\"blank-item\" style=\"display:inline-block;\">[填空1]</span>万元</p><p>该企业2023年度广告调增所得额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空2]</span>万元</p><p>该企业2023年度会业务招待费调增所得额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空3]</span>万元</p><p>该企业2023年度捐赠支出应调增所得额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空4]</span>万元</p><p>该企业2023年度三项经费应调增所得额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空5]</span>万元</p><p>该企业2023年度应纳税所得额=<span class=\"blank-item\" style=\"display: inline-block;\">[填空6]</span>万元</p><p>该企业2023年度应缴企业所得税=<span class=\"blank-item\" style=\"display: inline-block;\">[填空7]</span>万元</p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 2,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 3,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 4,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 5,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 6,
                "Score": 1.1,
                "score": 1.1,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 7,
                "Score": 1.4,
                "score": 1.4,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "022bfa8b25c445a78123f259581eb694",
            "TypeText": "填空题",
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807539,
            "max_retry": 1,
            "TemplateID": 10707998,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807539,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10707998,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>关于企业所得税的优惠政策哪些说法是错误的（　）</p><p><br/></p></div>",
            "Type": "MultipleChoice",
            "data": {},
            "Score": 5,
            "index": 0,
            "score": 5,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业购置并使用规定的环保、节能节水、安全生产等专用设备，该设备投资额的40%可以从应纳税所得额中抵免</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>创投企业从事国家需要扶持和鼓励的创业投资，可以按投资额的70%在当年应纳税所得额中抵免</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业综合利用资源生产符合国家产业政策规定的产品取得的收入，可以在计算应纳税所得额的时候减计收入10%</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>企业安置残疾人员，所支付的工资，按照残疾人工资的50%，加计扣除</p><p><br/></p></div>"
              }
            ],
            "Version": "f00c4fa2839f46ed90ea4638a0a09d5e",
            "TypeText": "多选题",
            "HalfScore": 0,
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807540,
            "max_retry": 1,
            "TemplateID": 10708004,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807540,
            "ProblemType": 2,
            "template_id": 10708004,
            "awardingRule": 1,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>下列项目中，可以自项目取得第一笔经营收入所属纳税年度起，享受定期减免税优惠的有（&nbsp; &nbsp; &nbsp; &nbsp;）</p><p><br/></p></div>",
            "Type": "MultipleChoice",
            "data": {},
            "Score": 5,
            "index": 0,
            "score": 5,
            "isEdit": false,
            "Options": [
              {
                "key": "A",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>从事农、林、牧、渔业项目所得</p><p><br/></p></div>"
              },
              {
                "key": "B",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>从事国家重点扶持的公共基础设施项目投资经营所得</p><p><br/></p></div>"
              },
              {
                "key": "C",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>从事符合条件的环境保护、节能节水项目所得</p><p><br/></p></div>"
              },
              {
                "key": "D",
                "value": "<div class=\"custom_ueditor_cn_body\"><p>符合条件的技术转让所得</p><p><br/></p></div>"
              }
            ],
            "Version": "512f6121968a47f993c38a75d919018d",
            "TypeText": "多选题",
            "HalfScore": 0,
            "HasRemark": false,
            "LibraryID": 101089,
            "ProblemID": 53807541,
            "max_retry": 1,
            "TemplateID": 10708002,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807541,
            "ProblemType": 2,
            "template_id": 10708002,
            "awardingRule": 1,
            "review_detail": {},
            "scope_of_question_answer": 0
          },
          {
            "Body": "<div class=\"custom_ueditor_cn_body\"><p>某企业2018年境内所得800万，适用25%企业所得税率，境外分回投资回报160万，境外已按该国20%企业所得税率交纳所得税，则该企业（计算结果不保留小数）</p><p style=\"white-space: normal;\">境外所得应纳税所得额=<span class=\"blank-item\" style=\"display:inline-block;\">[填空1]</span>万</p><p style=\"white-space: normal;\">境外所得税税额的抵免限额=<span class=\"blank-item\" style=\"display:inline-block;\">[填空2]</span>万<br/></p><p style=\"white-space: normal;\">境外所得实际缴纳所得税 =<span class=\"blank-item\" style=\"display:inline-block;\">[填空3]</span>万&lt;抵免限额50万<br/></p><p style=\"white-space: normal;\">本年度应交纳企业所得税=<span class=\"blank-item\" style=\"display:inline-block;\">[填空4]</span>万</p><p><br/></p><p><br/></p></div>",
            "Type": "FillBlank",
            "data": {},
            "Score": 8,
            "index": 0,
            "score": 8,
            "Blanks": [
              {
                "Num": 1,
                "Score": 2,
                "score": 2,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 2,
                "Score": 2,
                "score": 2,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 3,
                "Score": 2,
                "score": 2,
                "FuzzyMatch": false,
                "CaseSensitive": false
              },
              {
                "Num": 4,
                "Score": 2,
                "score": 2,
                "FuzzyMatch": false,
                "CaseSensitive": false
              }
            ],
            "isEdit": false,
            "Options": [],
            "Version": "4ddce7da49474b02a407b7bcfabda8cd",
            "TypeText": "填空题",
            "HasRemark": true,
            "LibraryID": 101089,
            "ProblemID": 53807542,
            "max_retry": 1,
            "TemplateID": 10708000,
            "difficulty": 0,
            "library_id": 101089,
            "problem_id": 53807542,
            "BlanksScore": [],
            "ProblemType": 4,
            "template_id": 10708000,
            "review_detail": {},
            "OrderInsensitive": false,
            "scope_of_question_answer": 0
          }
        ],
        "description": "第一大题"
      }
    ],
            "has_problem_dict": true,
            "font": "",
            "title": "第4章企业所得税"
  }
  }

  // 函数：消毒HTML内容，防止XSS攻击
  function sanitizeHTML(html) {
    const div = document.createElement('div');
    div.innerHTML = html;
    return div.textContent || div.innerText || "";
  }

  // 函数：打乱数组顺序（Fisher-Yates 算法）
  function shuffleArray(array) {
    for (let i = array.length - 1; i > 0; i--) {
      const j = Math.floor(Math.random() * (i + 1));
      [array[i], array[j]] = [array[j], array[i]];
    }
    return array;
  }

  // 函数：渲染试卷，只显示选择题，并随机打乱题目顺序
  function renderQuiz() {
    const quizTitle = document.getElementById('quiz-title');
    const quizContent = document.getElementById('quiz-content');
    const submitBtn = document.querySelector('.submit-btn');

    // 设置试卷标题
    quizTitle.innerHTML = data.data.title;

    // 遍历每个大题
    data.data.problems.forEach((section, sectionIndex) => {
      const sectionDiv = document.createElement('div');
      sectionDiv.className = 'section';

      const sectionTitle = document.createElement('h2');
      sectionTitle.innerHTML = section.title;
      sectionDiv.appendChild(sectionTitle);

      // 打乱当前大题的题目顺序
      const shuffledProblems = shuffleArray(section.problems.slice());

      // 遍历每个题目
      shuffledProblems.forEach((problem, problemIndex) => {
        // 只处理选择题
        if (problem.Type === 'SingleChoice' || problem.Type === 'MultipleChoice') {
          const questionDiv = document.createElement('div');
          questionDiv.className = 'question';

          // 题目标题
          const questionTitle = document.createElement('div');
          questionTitle.className = 'question-title';
          questionTitle.innerHTML = `问题 ${problemIndex + 1} (${problem.TypeText}) <span class="score">[${problem.Score} 分]</span>`;
          questionDiv.appendChild(questionTitle);

          // 题目内容
          const questionBody = document.createElement('div');
          questionBody.innerHTML = problem.Body;
          questionDiv.appendChild(questionBody);

          // 选项
          const optionsDiv = document.createElement('div');
          optionsDiv.className = 'options';

          problem.Options.forEach(option => {
            const label = document.createElement('label');
            const input = document.createElement('input');
            input.type = (problem.Type === 'SingleChoice') ? 'radio' : 'checkbox';
            // 使用唯一的name属性确保单选或多选的正确性
            input.name = `section${sectionIndex}_question${section.problems.indexOf(problem)}`;
            input.value = option.key;
            label.appendChild(input);
            label.innerHTML += `${option.key}. ${sanitizeHTML(option.value)}`;
            optionsDiv.appendChild(label);
          });

          questionDiv.appendChild(optionsDiv);
          sectionDiv.appendChild(questionDiv);
        }
      });

      quizContent.appendChild(sectionDiv);
    });

    // 显示提交按钮
    submitBtn.style.display = 'block';
  }

  // 函数：提交试卷
  function submitQuiz() {
    const resultDiv = document.getElementById('quiz-result');
    const quizContent = document.getElementById('quiz-content');
    const sections = quizContent.querySelectorAll('.section');
    let resultHTML = '<h3>您的选择：</h3><ul>';

    sections.forEach((section, sectionIndex) => {
      const questions = section.querySelectorAll('.question');
      questions.forEach((question, questionIndex) => {
        let answer = '';
        const questionTypeText = question.querySelector('.question-title').innerHTML;
        const isSingleChoice = questionTypeText.includes('单选题');
        const isMultipleChoice = questionTypeText.includes('多选题');

        if (isSingleChoice) {
          const selected = question.querySelector(`input[name="section${sectionIndex}_question${section.problems.indexOf(question)}"]:checked`);
          answer = selected ? selected.value : '未选择';
        } else if (isMultipleChoice) {
          const selected = question.querySelectorAll(`input[name="section${sectionIndex}_question${section.problems.indexOf(question)}"]:checked`);
          answer = selected.length > 0 ? Array.from(selected).map(input => input.value).join(', ') : '未选择';
        }

        resultHTML += `<li>第${sectionIndex + 1}大题 - 问题${questionIndex + 1}: ${answer}</li>`;
      });
    });

    resultHTML += '</ul>';
    resultDiv.innerHTML = resultHTML;
    resultDiv.style.display = 'block';
    window.scrollTo(0, document.body.scrollHeight);
  }

  // 页面加载完成后渲染试卷
  window.onload = renderQuiz;
</script>

</body>
</html>
